import request from '@/utils/request'

export default {

  /*根据一二三级分类查找对应的属性列表*/
  // GET /admin/product/attrInfoList/{category1Id}/{category2Id}/{category3Id}
  getAttrs(category1Id,category2Id,category3Id) {
    return request.get(`/admin/product/attrInfoList/${category1Id}/${category2Id}/${category3Id}`)
  },

  // 根据attrId删除对应的属性
  // DELETE /admin/product/deleteAttr/{attrId}
  delAttrById(attrId){
    return request.delete(`/admin/product/deleteAttr/${attrId}`)
  },

  //新增&修改接口
  //POST /admin/product/saveAttrInfo
  //新增接口时直接带数据
  add_updateAttr(attr){
    return request.post(`/admin/product/saveAttrInfo`,attr)
  }
}
